package com.taoxi.good.domain;

import com.taoxi.common.annotation.Excel;
import com.taoxi.common.core.domain.BaseEntity;
import com.taoxi.shops.domain.Factory;
import com.taoxi.shops.domain.Store;
import com.taoxi.shops.domain.Wholesaler;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;

/**
 * 商品管理对象 goods
 *
 * @author taoxi
 * @date 2024-10-28
 */
public class Goods extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 商品ID
     */
    private Long id;

    /**
     * 供应商ID
     */
    @Excel(name = "供应商ID")
    private Long suppleId;

    /**
     * 分类ID
     */
    @Excel(name = "分类ID")
    private Long categoryId;

    /**
     * 图片ID
     */
    @Excel(name = "图片ID")
    private Long imageId;

    /**
     * 商品名称
     */
    @Excel(name = "商品名称")
    private String goodName;

    /**
     * 商品描述
     */

    @Excel(name = "商品描述")
    private String description;

    /**
     * 商品价格
     */
//    @NotNull(message = "basePrice cannot be null")
//    @DecimalMin(value = "0.0", inclusive = true, message = "basePrice must be a valid number and greater than or equal to 0")
    @Excel(name = "商品价格")
    private BigDecimal basePrice;

    /**
     * 商品材料
     */
    @Excel(name = "商品材料")
    private String material;

    /**
     * 商品销量
     */
    @Excel(name = "商品销量")
    private Long sales;

    /**
     * 商品状态
     */
    @Excel(name = "商品状态")
    private String status;

    /**
     * 上下架状态
     */
    @Excel(name = "上下架状态")
    private String isOnShelf;

    /**
     * 供应商类型
     */
    @Excel(name = "供应商类型")
    private String suppleType;
    private Category category;
    private GoodImg image;
    private Store store;
    private Wholesaler wholesaler;
    private Factory factory;

    public Wholesaler getWholesaler() {
        return wholesaler;
    }

    public void setWholesaler(Wholesaler wholesaler) {
        this.wholesaler = wholesaler;
    }

    public Store getStore() {
        return store;
    }

    public void setStore(Store store) {
        this.store = store;
    }

    public Factory getFactory() {
        return factory;
    }

    public void setFactory(Factory factory) {
        this.factory = factory;
    }

    public GoodImg getImage() {
        return image;
    }

    public void setImage(GoodImg image) {
        this.image = image;
    }

    public Category getCategory() {
        return category;
    }

    public void setCategory(Category category) {
        this.category = category;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getSuppleId() {
        return suppleId;
    }

    public void setSuppleId(Long suppleId) {
        this.suppleId = suppleId;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public Long getImageId() {
        return imageId;
    }

    public void setImageId(Long imageId) {
        this.imageId = imageId;
    }

    public String getGoodName() {
        return goodName;
    }

    public void setGoodName(String goodName) {
        this.goodName = goodName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public BigDecimal getBasePrice() {
        return basePrice;
    }

    public void setBasePrice(BigDecimal basePrice) {
        this.basePrice = basePrice;
    }

    public String getMaterial() {
        return material;
    }

    public void setMaterial(String material) {
        this.material = material;
    }

    public Long getSales() {
        return sales;
    }

    public void setSales(Long sales) {
        this.sales = sales;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getIsOnShelf() {
        return isOnShelf;
    }

    public void setIsOnShelf(String isOnShelf) {
        this.isOnShelf = isOnShelf;
    }

    public String getSuppleType() {
        return suppleType;
    }

    public void setSuppleType(String suppleType) {
        this.suppleType = suppleType;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("suppleId", getSuppleId())
                .append("categoryId", getCategoryId())
                .append("imageId", getImageId())
                .append("goodName", getGoodName())
                .append("description", getDescription())
                .append("basePrice", getBasePrice())
                .append("material", getMaterial())
                .append("sales", getSales())
                .append("status", getStatus())
                .append("isOnShelf", getIsOnShelf())
                .append("suppleType", getSuppleType())
                .append("category", getCategory())
                .append("image", getImage())
                .append("store", getStore())
                .append("wholesaler", getWholesaler())
                .append("factory", getFactory())
                .append("updateTime", getUpdateTime())
                .append("createTime", getCreateTime())
                .toString();
    }
}
